Downhole Sensor MODBUS Data Emulator

ABSTRACT

In order to emulate the inputs from a DHS, RTD type sensors are typically employed, externally heated, and the input provided into an interface unit. At best such an approach provides a stop-gap solution that is cumbersome and not reliably repeatable. Such temporary inputs seldom provide the equivalent communications protocol verification between the surface controller of the DHS and the external communications device. Each DHS commercially available also uses different MODBUS register addresses for the requested data, as well as a variation in the number of parameters expected from the DHS itself, ranging from 3 to 7, depending on the vendor of choice. In this new design, a number of potentiometers are used to provide a variable signal level to the microprocessor, acting as variable parameters from the downhole sensor, the settings of which can be repeated for reliable test results.

FIELD OF THE INVENTION

This invention relates to an assembly and application program used toprovide equivalent signals for MODBUS emulation where used in downholesensor testing, or other devices used in support of submersibleequipment operation.

BACKGROUND

There are no known commercial downhole sensor (DHS) emulators available.In order to simulate the inputs from a DHS, RTD temperature sensors maybe employed, externally heated, and the input provided into theinterface unit. At best such an approach provides a stop-gap solutionthat is cumbersome and typically not repeatable. Such temporary inputsalso seldom provide the equivalent communications protocol verificationbetween the surface controller of the DHS and the externalcommunications device employed as part of the submersible equipmentstring.

Each DHS commercially available also uses different MODBUS registeraddresses for the requested data, as well as a variation in the numberof parameters expected from the DHS itself, ranging from 3 to 7,depending on the vendor of choice. Having to employ physical equipmentfor each possible type of DHS is cumbersome, time consuming, andexpensive, as each possible DHS employed must be available for test.

SUMMARY OF THE INVENTION

In a preferred embodiment, the present invention is the design andimplementation of an assembly and application program that emulatessignals generated by downhole sensors through interface control units.The downhole interface control units provide MODBUS communicationsprotocol for external devices to retrieve the emulated downhole sensormeasurements. Inputs that are emulated include Intake Pressure, IntakeTemperature, Motor Temperature, Vibration in X, Vibration in Y,Discharge Pressure, and Motor Winding Leakage. The system also providesfor baud rate, parity, and stop bit selection, thus allowing for manyvariations in the downhole sensor configuration.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is the general layout of the preferred embodiment of the MODBUSdownhole sensor signal emulator.

FIG. 2 is a more detailed layout of the preferred embodiment of theMODBUS downhole sensor signal emulator, including the baud rate, parityselection, and stop bit selection inputs.

FIG. 3 is a detailed layout of the preferred embodiment of the MODBUSdownhole sensor signal emulator input data and MODBUS address assignmenttable.

FIG. 4 is a simplified flow diagram of the preferred embodiment of theMODBUS downhole sensor signal emulator control application.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

The preferred embodiment of the downhole sensor (DHS) MODBUS dataemulator is illustrated in FIG. 1. The unit is assembled with a numberof potentiometers 1, 2 which are used to provide a variable signal levelto the microprocessor 5, acting as variable parameters from the wellsensor (DHS). The potentiometers 1, 2 are connected to a DC power supply3, providing a range of 0 to 10 VDC. This range provides voltages thatcan represent temperature, pressure, vibration, and leakage variables,where the exact value is not critical, however the variation isimportant to the processing unit, where it will be scaled appropriately.

In the preferred embodiment three of the potentiometers 1—IntakePressure, Intake Temp, and Motor Temp are wired directly into themicroprocessor 5 as they are present in all current DHS systems. Four ofthe potentiometers 2—Vib X, Vib Y, Discharge Pressure, and Leakage arewired through switches 9, either providing a 0 to 10 VDC 3 input signalor Ground 4 as the input to the microprocessor 5. These latter foursignals are optional with the DHS being employed, and vary by vendor andvendor DHS model. In some implementations of this unit, a meter withselection switch or multiple meters (not shown) could be included in theanalog inputs of the microprocessor 5 to indicate the exact voltagebeing converted (for use in calibration testing or where repeatableregression testing is required).

The microprocessor 5 contains the application program which will scanthe analog to digital convertor outputs, and place the resulting digitaltwo bytes of data into the appropriate MODBUS registers 7, depending onthe information contained in the MODBUS Address Input Table 6. When themicroprocessor 5 is queried from an external device, via the RS/485 8interface (other communication protocols could be implemented asdictated by the external device requirements), it will be in response toa MODBUS function call. The microprocessor 5 will interpret the requestfor information (Function Codes 03 or 04), determine the specificaddresses requested, format a data return, and send the requested datato the external device. This sequence is illustrated in FIG. 4.

The microprocessor 5 is illustrated in greater detail in FIG. 2. Theinputs, as previously described are analog signals varying from 0 to 10VDC, with inputs 1 being directly connected and inputs 2 being switchedbetween ground and a 0 to 10 VDC signal. All of the inputs connect toanalog to digital converters 10 within the microprocessor 5. Themicroprocessor 5 will scan the inputs on a periodic basis, real-timechanges are not critical, and store the digital data into theappropriate Holding or Input

Registers 12. The register destination is based on the informationsupplied in the MODBUS Address Input Table 11. The MODBUS Address InputTable 11 is an external device such as a flash drive, memory stick, orother similar device containing the address assignments for the MODBUSrequired to service any particular external requirement. For ease ofimplementation, each device's data requirements are in a standard format(FFFFnn HEX), where the nn identifies the start of a new DHS set ofaddress requirements, reference FIG. 3. The illustration given in FIG. 3shows three devices, each providing three emulated inputs, while one ofthe three also includes a fourth input, input 7. The MODBUS addresslocations follow the DHS assignment input and will range from three toseven in number.

The microprocessor 5 will build an internal cross reference table (notshown) to allow mapping of each input 1, 2 to be mapped into the MODBUSHolding and Input Registers 12 as dictated by the MODBUS Address InputTable entries. Each of the input signals will be mapped into theircorresponding Holding or Input Register by the microprocessor 5, andupdated on each periodic scan.

When the external device initiates a request for current data, themicroprocessor 5 will decode the request (in a standard MODBUS format ofFunction Code Field, starting address, and consecutive register count),and provide a response (in a standard MODBUS format of Function CodeField, byte count, followed by the data high byte, data low byte,repeated until all of the requested data has been sent). For example ifa request for data were received, it would appear similar to:

04 0001 0004

This request represents a query for the current status of four HoldingRegisters, starting with Holding Register 1. The microprocessor 5 willaccess the appropriate Input Registers 12, and format a return recordsimilar to:

04 08 IPHi IPLo DPHi DPLo ITHi ITLo MTHi MTLo

where the xxHi and xxLo represent the high and low bytes of theparticular data requested. While MODBUS has been the focus on theregister identification and interface protocol, a number of alternativescould be used as dictated by the external device requirements. Thechanges would be internal to the microprocessor 5 application.

Three switches 14 have been included in the preferred embodiment toprovide variation in communications definition, allowing for baud ratesof 9600 and 19.2K, parity selection of Odd or Even, and stop bitselection of 0 or 1 bits. Additional variations could be implementedthrough the use of rotary switches or multi-pole switches.

1. A system which emulates down hole sensor systems which includes: a means of emulating variable down hole parameters; a microprocessor for processing the parameter variations; a microprocessor for communicating with external devices; a means for loading down hole sensor register assignments for down hole parameter values; a means for loading communications protocol control information; and a means for loading application program updates.
 2. A system of claim 1 which provides emulated input variables representing such down hole variables as intake pressure, intake temperature, motor temperature, vibration in the X axis, vibration in the Y axis, discharge pressure, power cable leakage, and others as provided by the down hole sensor of choice.
 3. A system of claim 1 where the input variables may be directly connected to analog-to-digital convertors in the microprocessor for processing.
 4. A system of claim 1 where input variables may be connected via mechanisms to allow or disallow particular variables being input to the microprocessor analog-to-digital convertors for processing.
 5. A system of claim 1 containing a microprocessor and application program to scan the input variables, convert the signals to digital equivalents, and store the digital data into memory register locations as defined.
 6. A system of claim 1 containing a microprocessor and application program to provide communications to an external device via the preferred protocol (MODBUS in the preferred embodiment.)
 7. A system of claim 1 containing a means for modifying down hole data register assignments via flash memory, USB micro-drive, or similar media.
 8. A system of claim 1 containing a means for modifying down hole communications protocols via flash memory, USB micro-drive, or similar media.
 9. A system of claim 1 containing a means for modifying the application program via flash memory, USB micro-drive, or similar media.
 10. A system containing a series of mechanisms to provide baud rate, parity, and stop bit options for the communications protocol.
 11. A means to provide memory location assignments for the digital variable data as dictated by the communications protocol. 